package frsf.cidisi.exercise.modelo.situationCalculus;

import frsf.cidisi.faia.agent.Action;
import frsf.cidisi.faia.agent.ActionFactory;

import frsf.cidisi.exercise.modelo.situationCalculus.actions.*;

public class AgenteActionFactory extends ActionFactory {

    private static AgenteActionFactory instance;

    private AgenteActionFactory() {
    }

    public static AgenteActionFactory getInstance() {
        if (instance == null) {
            instance = new AgenteActionFactory();
        }
        return instance;
    }

    @Override
    protected String endActionString() {
        return "noAction";
    }

   
     @Override
   	 protected Action stringToAction(String stringAction) {
        Action actionObject = null;
        
	if (stringAction.equals("Avanzar")) {
            actionObject = new Avanzar();
        } else if (stringAction.equals("GirarIzq")) {
            actionObject = new GirarIzq();
        } else if  (stringAction.equals("GirarDer")){
            actionObject = new GirarDer();
        } else if (stringAction.equals("LevantarLlave")) {
            actionObject = new LevantarLlave();

        }
        
        return actionObject;
    }
}
